// vite.config.ts
import { defineConfig, loadEnv } from "file:///C:/Users/29359/Desktop/myCode/admin/node_modules/vite/dist/node/index.js";
import { createSvgIconsPlugin } from "file:///C:/Users/29359/Desktop/myCode/admin/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import vueJsx from "file:///C:/Users/29359/Desktop/myCode/admin/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
import vue from "file:///C:/Users/29359/Desktop/myCode/admin/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import { resolve } from "path";
var root = process.cwd();
function pathResolve(dir) {
  return resolve(root, ".", dir);
}
var vite_config_default = defineConfig(
  ({ command, mode }) => {
    console.log(command, mode);
    let env = {};
    if (command === "serve") {
      env = loadEnv("development", root);
    } else {
      env = loadEnv("production", root, "");
    }
    return {
      base: env.VITE_BASE_PATH,
      plugins: [
        vue(),
        vueJsx(),
        createSvgIconsPlugin({
          // 指定要缓存的图标目录
          iconDirs: [resolve(process.cwd(), "src/assets/icons")],
          // 指定symbolId格式
          symbolId: "icon-[dir]-[name]",
          svgoOptions: true
        })
      ],
      resolve: {
        extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".less", ".css"],
        alias: {
          "@": pathResolve("./src")
        }
      },
      server: {
        port: 3e3,
        host: "0.0.0.0",
        hmr: true
        // 热更新
      }
    };
  }
);
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFwyOTM1OVxcXFxEZXNrdG9wXFxcXG15Q29kZVxcXFxhZG1pblwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiQzpcXFxcVXNlcnNcXFxcMjkzNTlcXFxcRGVza3RvcF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